package controller.entitiesManagement;

import java.util.ArrayList;

public class EntitiesManagement {

	private static EntitiesManagement m_entitiesManagement;
	private ArrayList<Entity> m_entities;
	
	private EntitiesManagement(){
		m_entities = new ArrayList<Entity>();
	}
	
	public static EntitiesManagement getInstance(){
		if(m_entitiesManagement==null)
			m_entitiesManagement = new EntitiesManagement();
		return m_entitiesManagement;
	}
	
	public void addEntity(Entity entity){
		m_entities.add(entity);
	}
	
	public void removeEntity(Entity entity){
		m_entities.remove(entity);
	}
	
	public ArrayList<Entity> getEntities(){
		return m_entities;
	}
	
	public void addRandomEntities(int number_entities){
		for(int i=0;i<number_entities;i++)
			m_entities.add(new Entity());
	}
}
